/*

Stickman Adventure - a game created by Daco & his cousin

Copyright (C) 2011-2012  DacoTaco & Wouterke

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation version 2.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.


*/
#ifndef MovingObject_H
#define MovingObject_H

#include "Object.h"
#include "extern.h"
#include <SDL_mixer.h>

#define JUMP_YV  25
#define FALL_RATE 2
#define DEFAULT_YV 256
#define STATUS_HOP_JUMP 2
#define STATUS_HOP_DOWN 4

static float ObjectWalkDelay = 0.0f;
static float OBJECT_WALK_ANIMATION_DELAY = 0.0f;

/*
sound order in array for player
0 jump
1 death

*/

class MovingObject : public Object {
private:
	void MovingObject::initMovingObject();
protected:
	bool isdown;
	int status;
	int velocity;
	int yv;
	char dead;
public: 
	MovingObject(const char* spritesheet,int xpos , int ypos ,int h,int w ,char typeObj ,const char* sound[],int soundlength );
	MovingObject::MovingObject(const char* spritesheet,int xpos , int ypos ,int h,int w ,char typeObj );
	~MovingObject();
	char Update(int collision, int y_ground, int x_wall);
	virtual int GetVelocity(void);
	virtual void death(void);
	virtual char IsDead(void);

};

#endif